Skip to main content

Bill of Materials

macOS Bill of Materials (BOM) files are created when a user installs an application using the builtin package installer on macOS. BOM files contain metadata associated with the install application.

Collection

You have to use the artemis api in order to parse BOM data.

Sample API Script

import { parseBom } from "https://raw.githubusercontent.com/puffycid/artemis-api/master/mod.ts";

function main() {
const path = "path to bom file";
const results = parseBom(path);
console.log(results);
}

Output Structure

A BOM object structure

export interface Bom {
package_name: string;
install_data: string;
package_id: string;
package_version: string;
install_process_name: string;
install_prefix_path: string;
path: string;
/**Path to BOM file */
bom_path: string;
files: BomFiles[];
}

/**
* Bill of Materials (BOM) data
*/
export interface BomFiles {
/**User ID. Often blank */
uid: number;
/**Group ID. Often blank */
gid: number;
/**File permissions as decimal value */
mode: number;
/**File size */
size: number;
/**Path to file */
path: string;
/**Modified timestamp of file */
modified: string;
/**CRC-32 checksum for file */
checksum: string;
}